package com.ailink.design.pattern.strategy;

import com.ailink.design.pattern.strategy.impl.FlyWithRocket;

/**
 * Created by Administrator on 2018/9/21
 */
public class SpaceDuck extends Duck {
    public SpaceDuck() {
        super();
        super.setFlyingStrategy(new FlyWithRocket());
    }

    @Override
    public void display() {
        System.out.println("我头戴宇航头盔");
    }

    @Override
    public void quack() {
        System.out.println("我用无线电与你通信");
    }
}
